package com.example.common.entity;

import jakarta.persistence.*;
import lombok.Data;

import java.math.BigInteger;
import java.time.LocalDateTime;

@Entity
@Table(name = "sys_user")
@Data
public class SysUser {
    
    @Id
    @Column(name = "user_id", nullable = false)
    private BigInteger userId;
    
    @Column(name = "dept_id")
    private BigInteger deptId;
    
    @Column(unique = true)
    private String username;
    
    @Column(name = "nick_name", unique = true)
    private String nickName;
    
    private String phone, email, password;
    
    @Column(name = "avatar_name")
    private String avatarName;
    
    @Column(name = "avatar_path")
    private String avatarPath;
    
    @Column(length = 2)
    private String gender;
    
    @Column(name = "is_admin")
    private Boolean isAdmin;
    
    private BigInteger enabled;
    
    @Column(name = "create_by")
    private String createBy;
    
    @Column(name = "update_by")
    private String updateBy;
    
    @Column(name = "pwd_reset_time")
    private LocalDateTime pwdResetTime;
    
    @Column(name = "create_time")
    private LocalDateTime createTime;
    
    @Column(name = "update_time")
    private LocalDateTime updateTime;
    
    public BigInteger getUserId() {
        return userId;
    }
    
    public void setUserId(BigInteger userId) {
        this.userId = userId;
    }
    
    public BigInteger getDeptId() {
        return deptId;
    }
    
    public void setDeptId(BigInteger deptId) {
        this.deptId = deptId;
    }
    
    public String getUsername() {
        return username;
    }
    
    public void setUsername(String username) {
        this.username = username;
    }
    
    public String getNickName() {
        return nickName;
    }
    
    public void setNickName(String nickName) {
        this.nickName = nickName;
    }
    
    public String getPhone() {
        return phone;
    }
    
    public void setPhone(String phone) {
        this.phone = phone;
    }
    
    public String getEmail() {
        return email;
    }
    
    public void setEmail(String email) {
        this.email = email;
    }
    
    public String getAvatarName() {
        return avatarName;
    }
    
    public void setAvatarName(String avatarName) {
        this.avatarName = avatarName;
    }
    
    public String getAvatarPath() {
        return avatarPath;
    }
    
    public void setAvatarPath(String avatarPath) {
        this.avatarPath = avatarPath;
    }
    
    public String getPassword() {
        return password;
    }
    
    public void setPassword(String password) {
        this.password = password;
    }
    
    public String getCreateBy() {
        return createBy;
    }
    
    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }
    
    public String getUpdateBy() {
        return updateBy;
    }
    
    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }
    
    public String getGender() {
        return gender;
    }
    
    public void setGender(String gender) {
        this.gender = gender;
    }
    
    public Boolean getIsAdmin() {
        return isAdmin;
    }
    
    public void setIsAdmin(Boolean isAdmin) {
        this.isAdmin = isAdmin;
    }
    
    public BigInteger isEnabled() {
        return enabled;
    }
    
    public void setEnabled(BigInteger enabled) {
        this.enabled = enabled;
    }
    
    public LocalDateTime getPwdResetTime() {
        return pwdResetTime;
    }
    
    public void setPwdResetTime(LocalDateTime pwdResetTime) {
        this.pwdResetTime = pwdResetTime;
    }
    
    public LocalDateTime getCreateTime() {
        return createTime;
    }
    
    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }
    
    public LocalDateTime getUpdateTime() {
        return updateTime;
    }
    
    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }
}
